<template>
	<view style="width: 100%;height: auto;float: left;">
			<view class="shuru">
				<text class="shuru_tit t1">快递单号</text>
				<input type="text" class="shuru_text t1" value="" v-model="trackingNo" placeholder="请输入快递单号" />
			</view>
		<view class="tuic t2" @click="confirm()" style="margin-bottom: 10vw;">确认发货</view>
		<view class="bai t13" style="height: 12vw;"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tradeId:'',
				payeeId:'',
				status:''
			}
		},
		onLoad(option) {
			console.log("option: ",option);
			this.tradeId = option.tradeId
			this.payeeId = option.payeeId
			this.status = option.status
		},
		methods: {
			confirm(){
				let data = {
					tradeId:this.tradeId,
					payeeId:this.payeeId,
					status:this.status,
					trackingNo:this.trackingNo
				}
				this.$request.post(`ad/orderShipping`, data,'json')
					.then(res => {
						console.log("确认发货 res:", res)
						if(res.data.status==200){
							uni.navigateBack({
								delta:1
							})
						}
						
					}).catch(err => {
						console.log("确认发货 err:", err)
					})
			}
		}
	}
</script>

<style>
	.shuru {
		width: 100%;
		height: auto;
		display: block;
		float: left;
		border-radius: 1vw;
		overflow: hidden;
		padding: 2vw 4vw;
		background: #fff;
		margin-top: 4vw;
		box-shadow: 0px 0px 5px #eee;
	}

	.shuru_tit {
		width: 45%;
		height: 10vw;
		line-height: 10vw;
		display: block;
		float: left;
	}

	.shuru_text {
		width: 55%;
		height: 10vw;
		line-height: 10vw;
		display: block;
		float: right;
		text-align: right;
	}

</style>
